package com.java1234;

import com.java1234.rocketmq.ProducerService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class RocketmqTestProviderApplication {
    public static void main(String[] args) {
        //启动RocketmqTestProviderApplication应用；；；
        ConfigurableApplicationContext run = SpringApplication.run(RocketmqTestProviderApplication.class, args);
        //获取producerService的bean
        ProducerService producerService = (ProducerService) run.getBean("producerService");
        //发送消息
//        producerService.sendMessage();
        //发送同步消息
//        producerService.sendSyncMessage();
        //发送异步消息
//        producerService.sendAsyncMessage();
        //发送单向消息
//        producerService.sendOneWayMessage();
        //发送同步顺序消息
//            producerService.sendOrderlyMessage();
//        //发送延迟消息
//        producerService.sendDelayMessage();
        //发送延迟消息
//        producerService.sendTransactionMessage();
        //发送消息过滤tag
//        producerService.sendMessageWithTag();
        //发送消息SQL过滤
        producerService.sendMessageWithSQL();
    }
}
